home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / examples / helloworld.lsp < prev    next >
Encoding:
Text File  |  1991-10-06  |  1.9 KB  |  49 lines

  1. ; -*-Lisp-*-
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;
  4. ; File:         helloworld.lsp
  5. ; RCS:          $Header: helloworld.lsp,v 1.2 91/10/05 17:32:58 mayer Exp $
  6. ; Description:  
  7. ; Author:       Niels Mayer, HPLabs
  8. ; Created:      Wed Jul 11 17:07:30 1990
  9. ; Modified:     Sat Oct  5 17:32:47 1991 (Niels Mayer) mayer@hplnpm
  10. ; Language:     Lisp
  11. ; Package:      N/A
  12. ; Status:       X11r5 contrib tape release
  13. ;
  14. ; WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  15. ; XLISP version 2.1, Copyright (c) 1989, by David Betz.
  16. ;
  17. ; Permission to use, copy, modify, distribute, and sell this software and its
  18. ; documentation for any purpose is hereby granted without fee, provided that
  19. ; the above copyright notice appear in all copies and that both that
  20. ; copyright notice and this permission notice appear in supporting
  21. ; documentation, and that the name of Hewlett-Packard and Niels Mayer not be
  22. ; used in advertising or publicity pertaining to distribution of the software
  23. ; without specific, written prior permission.  Hewlett-Packard and Niels Mayer
  24. ; makes no representations about the suitability of this software for any
  25. ; purpose.  It is provided "as is" without express or implied warranty.
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27.  
  28. (let* (                    ;let* declares local variables
  29.        (top_w                ;top_w is local to "let*" form
  30.     (send TOP_LEVEL_SHELL_WIDGET_CLASS :new "heloshl"
  31.           :XMN_TITLE     "Hello World"
  32.           :XMN_ICON_NAME "Hello World"
  33.           ))
  34.        (but_w                ;but_w is local to "let*" form
  35.     (send XM_PUSH_BUTTON_WIDGET_CLASS :new :managed
  36.           "helobut" top_w
  37.           :XMN_LABEL_STRING "hello world"
  38. ;;;           :XMN_FONT_LIST    "8x13"
  39.           ))
  40.        )
  41.  
  42.   (send but_w :add_callback :XMN_ACTIVATE_CALLBACK '()
  43.     '(
  44.       (format t "hello world\n")    ;print a message to standard output
  45.       ))
  46.   (send top_w :realize)
  47.   )
  48.  
  49.